<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>FBA订单日收入报表</title><body class="withvernav">
<style type="text/css">
	thead tr td{
		vertical-align: middle;background-color: #CCCCCC; border: 1px solid #000000 !important ; text-align: center;
	}
	.stdtable tbody tr td{padding:3px 5px;}
</style>
<div class="bodywrapper"> {{include file='/public/leftmenu.tpl'}}
  <div class="centercontent">
    <div class="pageheader notab">
      <h1 class="pagetitle">FBA订单日收入报表</h1>
</div>
<!--pageheader-->
    
    <div id="contentwrapper" class="contentwrapper">
      
          <!--搜索栏-->
            <div class="page" style="display:none">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
    <form class="stdform stdform2" method="get" action="/report/fbaSellForDay">
      <div class="tableoptions"> 
      导入时间：
       <input type="text"  name="starttime" value="{{$starttime}}" onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" /> - <input type="text"  name="endtime" value="{{$endtime}}" onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" />
        
<span id="search_list">{{$shopname|getstr:35}}</span>
<input name="shopname" id="shopname" type="hidden" value="{{$shopname}}" />
<span id="choose_shop_btn" style="border:1px solid #ccc;padding:6px 5px 7px;border-radius:3px;cursor:pointer;" onClick="getShopList()">选择店铺 <img src="/fuman/images/search_down.png" width="14" height="21" align="absmiddle" style="margin-bottom:-4px;"></span>
       &nbsp;&nbsp;
        <button class="btn btn_orange btn_search radius50">Search</button>&nbsp;&nbsp;
     </div>
       
    </form>
    
    
    <!--搜索栏结束--> 
    <div class="x_content" style="overflow-x:auto;">
             <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
            <thead>
              <tr bgcolor="#CCCCCC">
                <th height="20" bgcolor="#CCCCCC">时间</th>
                <th bgcolor="#CCCCCC">交易金额</th>
                <th  bgcolor="#CCCCCC">收入运费</th>
                <th  bgcolor="#CCCCCC">小计</th>
                <th bgcolor="#CCCCCC">商品成本</th>
                <th bgcolor="#CCCCCC">FBA费用</th>
                <th bgcolor="#CCCCCC">头程</th>
                <th bgcolor="#CCCCCC">利润</th>
                <th bgcolor="#CCCCCC">商品销量</th>
                <th bgcolor="#CCCCCC">订单数量</th>
                  <th  bgcolor="#CCCCCC">查看订单</th>
              </tr>
            </thead>
          
             {{foreach from=$list item=res key=key}}
             <tr>
               <td height="20" align="center">{{$res.dates}}</td>
               <td height="20" align="center">{{$res.goods_amount_total}}</td>
               <td height="20" align="center">{{$res.realfee}}</td>
               <td height="20" align="center">{{$res.goods_amount_total+$res.shipping_fee_total}}</td>
               <td height="20" align="center">{{$res.costprice_total}}</td>
               <td height="20" align="center">{{$res.payship_fee_total}}</td>
               <td align="center">{{$res.ship_price}}</td>
               <td align="center">{{$res.lvrun}}</td>
               <td height="20" align="center">{{$res.goods_number_total}}</td>
               <td height="20" align="center">{{$res.order_total}}</td>
               <td height="20" align="center"><a href="/order/amazonfba?ty=2&starttime={{$res.dates}}&endtime={{$res.dates}}&isall=1&shopid={{$shopsid}}" target="_blank">查看订单</a></td>
             </tr>
            {{/foreach}}
            <tr>
            <td class="head1" align="center"><B>合计</B></td>
              <td class="head1" align="center"><font color="#FF0000"><B>{{$tal.goods_amount_total}}</B></font></td>
              <td class="head1" align="center"><font color="#FF0000"><B>{{$tal.realfee}}</B></font></td>
              <td class="head1" align="center"><font color="#FF0000"><B>{{$tal.i_total}}</B></font></td>
              <td class="head1" align="center"><font color="#FF0000"><B>{{$tal.costprice_total}}</B></font></td>
              <td class="head1" align="center"><font color="#FF0000"><B>{{$tal.payship_fee_total}}</B></font></td>
              <td class="head1" align="center"><font color="#FF0000"><B>{{$tal.ship_price_total}}</B></font></td>
              <td class="head1" align="center"><font color="#FF0000"><B>{{$tal.lirun}}</B></font></td>
              <td class="head1" align="center"><font color="#FF0000"><B>{{$tal.goods_number_total}}</B></font></td>
              <td class="head1" align="center"><font color="#FF0000"><B>{{$tal.order_total}}</B></font></td>
              <td>&nbsp;</td>
            </tr>
          </table>
      </div>
     </div>
{{if $list[0] neq ''}}<div align="center"><div id="chartContainer">收入与支出图形</div> <br /></div>{{/if}}
<div style="position:absolute;z-index:999;top:105px;border:1px solid #666;left:220px;width:870px;background:#f5f5f5;padding:6px 10px;height:450px;margin-bottom:40px;display:none;" id="ajax_box">
<div style="padding-top:8px;padding-left:12px;height:28px;"><h4 style="float:left">选择要搜索的店铺</h4><span style="float:right">
  <input type="button" name="button" id="button" onClick="setShopInfo()" value="确定选择">&nbsp;&nbsp;
  <input type="button" value="关闭弹层" onClick="closeShowBox()">
</span></div>
<div id="shop_box" style="height:400px;overflow:auto"></div>
</div>
<script type="text/javascript" src="/fuman/js/report.js"></script>
<script type="text/javascript" src="/fuman/js/charts/fusioncharts.charts.js"></script>
<script type="text/javascript" src="/fuman/js/charts/fusioncharts.js"></script>
<script type="text/ecmascript">
FusionCharts.ready(function(){
var myChart = new FusionCharts({
      "type": "mscolumn2d",
      "renderAt": "chartContainer",
      "width": "90%",
      "height": "310",
      "dataFormat": "xml",
      "dataSource": "<chart caption='FBA营收与支出图表' subcaption='' xaxisname='日期' showValues='0' yaxisname='交易金额' numberprefix='￥' bgalpha='0' borderalpha='20' canvasborderalpha='0' formatNumberScale='0' theme='fint' useplotgradientcolor='0' plotborderalpha='10' placevaluesinside='1' rotatevalues='1' valuefontcolor='#ffffff' captionpadding='20' showaxislines='1' axislinealpha='25' divlinealpha='10' palettecolors='#0075c2,#1aaf5d'><categories>{{foreach from=$imgdata item=res key=key}}<category label='{{$res.dates|substr:5:5}}' showValue='0' />{{/foreach}}</categories><dataset seriesname='营收'>{{foreach from=$imgdata item=res key=key}}<set value='{{$res.goods_amount_total+$res.shipping_fee_total}}' />{{/foreach}}</dataset><dataset seriesname='支出'>{{foreach from=$imgdata item=res key=key}}<set value='{{$res.costprice_total-$res.payship_fee_total}}' />{{/foreach}}</dataset></chart>"
    });
  myChart.render();
})
</script>
</div>
</body>
</html>